<?php

class EWebUser extends CWebUser{
 
    protected $_model;
  
    function isAdmin(){
        $user = $this->loadUser();
        if ($user)
           return $user->rol==RolLookUp::ADMIN;
        return false;
    }
 
    // Load user model.
    protected function loadUser()
    {
        if ( $this->_model === null ) {
                $this->_model = Usuarios::model()->findByPk( $this->id );
        }
        return $this->_model;
    }
	
	
}


?>